module Hashish
  # Configuration
  module Configuration
    # Redis connection instance
    attr_accessor :redis_connection
    
    # Redis namespace for keys
    attr_writer :redis_namespace

    # Redis search keys ttl (minutes)
    attr_writer :redis_search_keys_ttl

    # Redis namespace for keys
    def redis_namespace
      @redis_namespace ||= 'hashish'
    end

    # Redis search keys ttl (minutes)
    def redis_search_keys_ttl
      @redis_search_keys_ttl ||= 5 # minutes
    end

    def configure
      yield self
    end
  end
end
